package org.example.rabbitMq.listener;


import org.example.po.Mail;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class QueueListener1 {



    @RabbitListener(queues = "myqueue2")
    public void displayMail(Mail mail) {
        System.out.println("QueueListener1: "+mail.toString());
    }

}
